package com.example.demo.exception;

import com.example.demo.result.CodeMsg;

/**
 * 全局异常处理
 *
 */
public class GlobalException extends RuntimeException{

    private static final long serialVersionUID = 1L;
    private CodeMsg cm;
    private String scm;
    public String getScm() {
        return scm;
    }

    public void setScm(String scm) {
        this.scm = scm;
    }


    public GlobalException(CodeMsg cm){
        super(cm.toString());
        this.cm=cm;

    }

    public GlobalException(String cm){
        super(cm);
        this.scm=cm;

    }

    public CodeMsg getCm() {
        return cm;
    }
    public void setCm(CodeMsg cm) {
        this.cm = cm;
    }

}
